From: Florian Müllner Date: Tue, 23 Jan 2024 22:40:04 +0000 (+0100) Subject: iconGrid: Don't recreate StIcons on icon theme changes X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~281^2~2^2~107 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8a1f44f10af340d0c79c596e9754718c68388c1b;p=gnome-shell.git iconGrid: Don't recreate StIcons on icon theme changes Now that StIcon updates its texture automatically on icon theme changes, we only have to recreate icon actors that aren't StIcons. (This probably only applies to the folder icon in the app grid where the sub-icons do use St.Icon, but making that assumption feels dodgy with an API as generic as `createIcon()`) Part-of: --- diff --git a/js/ui/iconGrid.js b/js/ui/iconGrid.js index d55f30d13..75cc6f7b0 100644 --- a/js/ui/iconGrid.js +++ b/js/ui/iconGrid.js @@ -156,7 +156,9 @@ class BaseIcon extends Shell.SquareBin { } _onIconThemeChanged() { - this._createIconTexture(this.iconSize); + // St.Icon updates automatically + if (!(this.icon instanceof St.Icon)) + this._createIconTexture(this.iconSize); } animateZoomOut() {